package network;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketException;

import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.TargetDataLine;

import model.Call;
import model.EnumCallStatus;
import model.Model;

public class UDPRecordAndSend extends Thread {
	private int bufferLength = 640;
	private int portToSend;
	private InetAddress addressToSend;
	private AudioFormat format;
	private Call call;
	
	public UDPRecordAndSend(InetAddress address, int port, AudioFormat format, Call call){
		this.addressToSend = address;
		this.portToSend = port;
		this.format=format;
		this.call=call;
		System.out.println("[UDPRecordAndSend] : IP = "+address.toString()+" / Port = "+portToSend);
		byte[] buffer = new byte[bufferLength];
	}

public int getPortToSend() {
	return portToSend;
}

public InetAddress getAddressToSend() {
	return addressToSend;
}

}
